<tagLib name="html" />
<include file="../Public/header" />
<script>
//院系，专业，班级
YXZYBJ = [
["CategoryName","ParentId","Id"],
<?php
for($i=0;$i<count($yxzybj);$i++){
echo '["'.$yxzybj[$i]['CODENAME'].'","'.$yxzybj[$i]['PCODE'].'","'.$yxzybj[$i]['CODE'].'"]';if((count($yxzybj)-1)!=$i) {echo ",";}echo "\n";
}
?>
];

</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function addRow(){   
	curFileNum++;
	rowsnum++;
    var row=tbl.insertRow(-1);
	//var td = arow.insertCell();
	var cell = document.createElement("td");
	cell.innerHTML=' <div class="impBtn  fLeft" ><INPUT TYPE="file" id="file'+curFileNum+'" name="file'+ curFileNum +'" class="file  huge"></div><div class="fLeft hMargin"></div><INPUT TYPE="submit" value="上 传" onclick="uploading();" class="fLeft small button ">';
	cell.align="center"
	row.appendChild(cell); 
	//addFileForm.num.value=rowsnum;
}
function deleteRow(){
	if(tbl.rows.length>0){
		tbl.deleteRow(rindex); //删除当前行
		rowsnum--;    
	}else{
		return;
	}
	rindex="";
}
function getObject(obj){ 
	rindex=obj.parentElement.parentElement.rowIndex;/*当前行对象*/
}

function uploading(msg){
	document.getElementById('result').style.display = 'block';
	document.getElementById('result').innerHTML	=	'<IMG SRC="__PUBLIC__/Images/ajaxloading.gif" WIDTH="16" HEIGHT="16" BORDER="0" ALT="" align="absmiddle"> 文件上传中～';
	return true;
}

function uploadComplete(savename){
	//document.getElementById('img').innerHTML = '<div style="float:left;border:1px solid silver;padding:3px;margin:0px 8px"><img src="__PUBLIC__/Uploads/'+savename+'"   align="absmiddle" /></div>';
	//var name	 =	 savename.split('.');
	//document.getElementById('img').innerHTML = '<div style="float:left;border:1px solid silver;padding:3px;margin:0px 8px"><img src="__PUBLIC__/Uploads/'+name[0]+'_thumb.'+name[1]+'"   align="absmiddle" /></div>';
	document.getElementById('photo').src="__PUBLIC__/Uploads/"+savename;
	document.getElementById('photoName').value=savename;
}
//-->
</SCRIPT>
<div id="main" class="main" >
<div class="content">
<div class="title">编辑照片 [ <A HREF="__URL__">返回列表</A> ]</div>

<TABLE cellpadding=3 cellspacing=3>

<TR>
	<TD width="161" class="tRight" >学号：</TD>
	<TD colspan="2" class="tLeft" >{$vo.xh}</TD>
</TR>
<TR>
	<TD width="161" class="tRight" >姓名：</TD>
	<TD colspan="2" class="tLeft" >{$vo.xm}</TD>
</TR>
<TR>
	<TD valign="top" class="tRight" >照片：</TD>
	<TD width="223" class="tLeft" ><img src="{$vo.photoname}" width="110" height="140" id="photo"/></TD>
    <TD width="860" valign="top" class="tLeft" >

<form id="upload" METHOD=POST action="__URL__/upload/" enctype="multipart/form-data" target="iframeUpload">
<TABLE cellpadding=3 cellspacing=3 width="500PX">
<TR>
	<TD colspan="2" class="tLeft">
	<div class="result" style="background:#E9E9F3">上传允许文件类型：gif png jpg 图像文件，高宽110*140比例，大小不超过320k。<font color="#FF0000">注意：上传后要才有效</font></div>
	</TD>
</TR>
<TR>
	<TD class="tRight tTop"></TD>
	<TD class="tLeft tTop">
	<div id="result" class="result none"></div>
	<INPUT TYPE="hidden" name="ajax" value="1">
	<iframe name="iframeUpload" src="" width="350" height="35" frameborder=0  SCROLLING="no" style="display:NONE"></iframe>
	<input type="hidden" name="MAX_FILE_SIZE" value="3292200" />
	<INPUT TYPE="hidden" name="_uploadFileResult" value="result">
	<INPUT TYPE="hidden" name="_uploadFormId" value="upload">
	<INPUT TYPE="hidden" name="_uploadFileSize" value="3292200">
	<INPUT TYPE="hidden" NAME="_uploadFileType" value="jpg,gif,png,jpeg" >
	<INPUT TYPE="hidden" name="_uploadResponse" value="uploadComplete">
	<INPUT TYPE="hidden" NAME="_uploadImgThumb" value="1">
	<INPUT TYPE="hidden" NAME="_uploadThumbSuffix" value="_thumb">
	<INPUT TYPE="hidden" NAME="_uploadThumbMaxWidth" value="50">
	<INPUT TYPE="hidden" NAME="_uploadThumbMaxHeight" value="50">
	<INPUT TYPE="hidden" name="_uploadSavePath" value="<?php echo APP_PATH.'/../'.'Public/Uploads/';?>" >
	<TABLE id='tbl' style="clear:both"></TABLE>
		<div id="img" ></div>
</TD>
</TR>
</TABLE>
</form>
</div><SCRIPT LANGUAGE="JavaScript">
<!--
var curFileNum = 0;
var rowsnum=0;  //记录行数
var rindex="";       //列索引
var tbl	=	document.getElementById('tbl');
addRow();
//-->
</SCRIPT>



</TD>
</TR>
<FORM METHOD=POST id="form1" action="__URL__/update/" onsubmit="return CheckForm(this)">

<!--<TR>
	<TD class="tRight" >姓名：</TD>
	<TD class="tLeft" ><INPUT TYPE="text" class="medium bLeftRequire"  check='Require' warning="姓名不能为空" NAME="xm" value="{$vo.xm}"></TD>
</TR>
<TR>
	<TD class="tRight">性别：</TD>
	<TD class="tLeft"><SELECT class="small bLeft"  NAME="xb">
	<option <eq name="vo.xb" value="男" >selected</eq> value="男">男</option>
	<option <eq name="vo.xb" value="女" >selected</eq> value="女">女</option>
	</SELECT></TD>
</TR>
<TR>
	<TD class="tRight" >院系：</TD>
	<TD class="tLeft" ><INPUT TYPE="text" class="medium bLeft" NAME="yx" value="{$vo.yx}"></TD>
</TR>
<TR>
	<TD class="tRight" >专业：</TD>
	<TD class="tLeft" ><INPUT TYPE="text" class="medium bLeft" NAME="zy" value="{$vo.zy}"></TD>
</TR>
<TR>
	<TD class="tRight" >班级：</TD>
	<TD class="tLeft" ><INPUT TYPE="text" class="medium bLeft" NAME="bj" value="{$vo.bj}"></TD>
</TR>
<TR>
	<TD class="tRight" >年级：</TD>
	<TD class="tLeft" ><INPUT TYPE="text" class="medium bLeft" NAME="nj" value="{$vo.nj}"></TD>
</TR>-->

<TR>
<TD ></TD>
	<TD colspan="2" class="center"><INPUT TYPE="hidden" name="xh" value="{$vo.xh}" >
	<INPUT TYPE="hidden" id="photoName" name="photoName" value="" >
	<INPUT TYPE="submit" value="保 存" class="small submit">
	<INPUT TYPE="reset" class="submit  small" value="清 空" >	</TD>
</TR>
</TABLE>
</FORM>
</div>
</div>
<!-- 主页面结束 -->
{// 加载尾部公共文件 }
<include file="../Public/footer" /> 